package org.hot100_6.leetcode283;

public class Solution {
    public void moveZeroes(int[] nums) {
        int slow =0;
        int fast = 0;
        int size = nums.length;

        for (fast = 0; fast < size; fast++) {
                if (nums[fast]!=0){
                    nums[slow]=nums[fast];
                    slow++;
                }
        }

        for (int i = slow; i <size ; i++) {
            nums[i]=0;
        }
    }
}
